/**
 * Copyright &copy; 2018-2018 <a href="#">聚成科技</a> All rights reserved.
 */
package com.jckj.core.service;

import com.github.pagehelper.PageInfo;
import com.jckj.core.entity.FarmPark;
import com.jckj.core.entity.SysUser;
import com.jckj.core.exception.ServiceException;
import com.jckj.core.vos.FarmParkQueryVo;
import org.springframework.stereotype.Service;

import javax.sql.rowset.serial.SerialException;
import java.util.List;

/**
 * <p>
 * 园区服务接口
 * </p>
 *
 * @author 刘志远
 * @date 18-1-24
 */
@Service
public interface ParkService {

    /**
     * 新增园区
     *
     * @param farmPark
     * @return
     * @throws ServiceException
     */
    int add(FarmPark farmPark) throws ServiceException;

    /**
     * 修改园区
     *
     * @param farmPark
     * @return
     * @throws ServiceException
     */
    void update(FarmPark farmPark) throws ServiceException;

    /**
     * 删除园区
     *
     * @param farmPark
     * @return
     * @throws SerialException
     */
    void delete(FarmPark farmPark) throws ServiceException;

    /**
     * 增加园区管理员
     *
     * @param sysUser
     * @param farmPark
     * @return
     * @throws ServiceException
     */
    int addAdmin(SysUser sysUser, FarmPark farmPark);

    /**
     * 锁定园区管理员
     *
     * @param farmPark
     * @return
     * @throws ServiceException
     */
    int lock(FarmPark farmPark);

    /**
     * 查询所有园区信息
     * @return
     */
    List<FarmPark> findAll();

    /**
     * 判断园区编号
     *
     * @param farmParkQueryVo
     * @return
     * @throws ServiceException
     */
    long checkParkNo(FarmParkQueryVo farmParkQueryVo);

    /**
     * 查询园区信息
     *
     * @param farmParkQueryVo
     * @return
     * @throws ServiceException
     */
    PageInfo<FarmPark> findByPage(FarmParkQueryVo farmParkQueryVo);

    /**
     * 根据ID查询园区
     * @param parkId
     * @return
     * @throws ServiceException
     */
    FarmPark querySingleFramParkById(String parkId);

    /**
     * 禁用园区
     * @param farmPark
     */
    void disabledFarmPark(FarmPark farmPark);

    /**
     * 启用园区
     * @param farmPark
     */
    void enabledFarmPark(FarmPark farmPark);
}
